﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="false" CodeBehind="Default.aspx.cs" Inherits="Acme.TestSite.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="pageblock">

<h1>nHydrate Northwind Example</h1>
<p>
This is an example site to demonstrate how to use a geneated API created with nHydrate. 
The only error checking is model based.
This site is not setup to test advacned data validation but show how to add, edit, and delete generated data.
There is some validation and checking.
</p>

<div class="attentionbox">
<h3>Site Features</h3>
<ul>
<li>Non-null fields are validated for existence</li>
<li>Strings are validated for length</li>
<li>Numbers are validated for type</li>
<li>Email (for Customer entity) is validated against a regular expression</li>
<li>Headers are loaded from model and different from field name</li>
<li>Removing objects with dependencies shows error (remove pre-defined Region)</li>
<li>Edit form controls are bound to entity objects of type 'BasePersistablePage'</li>
<li>All binding is strongly-typed with no 'Magic strings'</li>
</ul>
</div>

<p>
This sample site has not been fully developed. You cannot add and delete on every screen.
If you wish to add or delete data, use the <a href="/RegionList.aspx">Regions Screen</a>. 
This list screen has an Add button for creating new items.
Each item in the list has a Delete link to remove individual items.
</p>

<h3>Direct Connection</h3>
<p>
This example was written against the Entity Framework DAL (data access layer). 
The connection string is setup in the &quot;Web.config&quot; file.
All of the queries can use LINQ directly against the DAL.
</p>

<h3>Dependency Walking</h3>
<p>
Using the DAL is easiest way to perform dependecy walking operations. 
You simply call the property for a related object or list from any other object. 
Notice that some objects have other object lists or items to related objects.
For example, the Customer object has an OrderList property because of its relation.
An Order object has a back pointer to its parent Customer object.
</p>

</div>
</asp:Content>
